<extend name="Index/index"/>

<block name="content">
    <!--<div class="view-product" style="margin-top: 50px">-->
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">{{$title}}</h6>
            </div>
            <a href="{{$prevUrl}}" class="layui-btn layui-btn-normal" style="margin: 20px 0 0 20px">返回上一页</a>
            <div class="layui-container" style="margin-top: 20px">
                <div class="layui-row">
                    <!--<div class="demoTable">-->
                        <!--<a href="{{$prevUrl}}" class="layui-btn layui-btn-normal">返回上一页</a>-->
                    <!--</div>-->
                    <div class="layui-col-md7">
                        <form class="layui-form" action="{{:U('User/saveUser')}}" method="post">
                            <input type="hidden" name="id" value="{{$userInfo.id}}">
                            <div class="layui-form-item">
                                <label class="layui-form-label">用户名</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name"  autocomplete="off" class="layui-input"value="{{$userInfo['name']}}" disabled>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">手机</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="tel"  autocomplete="off" class="layui-input"value="{{$userInfo['tel']}}" required  lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">身份证号</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="card_num"  autocomplete="off" class="layui-input"value="{{$userInfo['card_num']}}" required  lay-verify="required">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">职位</label>
                                    <div class="layui-input-inline">
                                        <select name="category" lay-verify="required" lay-search="">
                                            <foreach name="cateList" item="vo">
                                                <eq name="vo.name" value="$userInfo['category_name']">
                                                    <option value="{{$vo.id}}" selected>{{$vo.name}}</option>
                                                <else/>
                                                    <option value="{{$vo.id}}">{{$vo.name}}</option>
                                                </eq>

                                            </foreach>

                                        </select>
                                    </div>
                                </div>
                            </div>
                            <neq name="userInfo.group_name" value="">
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">小组</label>
                                        <div class="layui-input-inline">
                                            <select name="group" lay-verify="required" lay-search="">
                                                <foreach name="groupList" item="vo">
                                                    <eq name="vo.group_name" value="$userInfo['group_name']">
                                                        <option value="{{$vo.id}}" selected>{{$vo.group_name}}</option>
                                                        <else/>
                                                        <option value="{{$vo.id}}">{{$vo.group_name}}</option>
                                                    </eq>

                                                </foreach>

                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </neq>
                            <div class="layui-form-item">
                                <label class="layui-form-label">状态</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="status" value="1" title="正式党员" {{$userInfo['status'] == 1 ? "checked" : ""}}>
                                    <input type="radio" name="status" value="0" title="预备党员" {{$userInfo['status'] == 0 ? "checked" : ""}}>
                                </div>
                            </div>
                            <eq name="userInfo.status" value="0">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">入党时间</label>
                                        <div class="layui-input-inline">
                                            <input type="text" class="layui-input" id="test3" name="join_time" value="">
                                        </div>
                                        <div class="layui-form-mid layui-word-aux">未入党</div>

                                </div>
                            </eq>


                            <div class="layui-form-item">
                                <label class="layui-form-label">党费缴纳至</label>
                                <eq name="userInfo['fee_time']" value="0000-00-00 00:00:00">
                                    <div class="layui-input-inline">
                                        <input type="text" class="layui-input" id="test1" name="fee_time" value="">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">未缴纳过党费</div>
                                    <else/>
                                    <div class="layui-input-inline">
                                        <input type="text" class="layui-input" id="test2" name="fee_time" value="{{:substr($userInfo['fee_time'],0,7)}}" required  lay-verify="required">
                                    </div>
                                </eq>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit >立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
            <script>
                //Demo
                layui.use('form', function(){
                    var form = layui.form;

                    //监听提交
                    form.on('submit(formDemo)', function(data){
                        layer.msg(JSON.stringify(data.field));
                        return false;
                    });
                });
                layui.use('laydate', function(){
                    var laydate = layui.laydate;
                    //日期时间选择器
                    laydate.render({
                        elem: '#test1'
                        ,type: 'month'
                    });
                    laydate.render({
                        elem: '#test2'
                        ,type: 'month'

                    });
                    laydate.render({
                        elem: '#test3'
                    });
                    laydate.render({
                        elem: '#test4'

                    });
                });
            </script>

        </div>
    <!--</div>-->

</block>